<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head></head>
<body><h2 class="Welcome">Using libnfsidmap for uid/gid resolution</h2><span style="font-weight: bold;"><span style="font-weight: bold;"></span></span>As
you know, NFSv4 uses "fully qualified names" instead of the Unix
related uids/gids used in NFSv2 and NFSv3. This means that every group
and user is identified by a UTF8 string whose shape is kind of
"myusername@mydomain".<br><br>The kernel implementation of NFSv4 make use of the <span style="font-weight: bold;">rpc.idmapd</span>
for such a resolution. It is a user space daemon that uses the
rpc_pipefs to provide the kernel with idmap resolution. Its
configuration file is classically located under <span style="font-style: italic;">/etc/idmapd.conf </span>.
The architecture of this program is quite simple : it has functions for
using the rpc_pipefs, it uses libevent for watching queries from this
pipe and uses the libnfsidmap library to make the "name &lt;=&gt; id"
resolution. This library is classically provided with the nfs-utils
package (depending on the kind of distribution you use). <br><br>A
recent modification of NFS-GANESHA makes it possible to link with
libnfsidmap. You'll have to make sure that libnfsidmap is&nbsp;
accessible (in fact make sure that <span style="font-style: italic;">/usr/lib/libnfsidmap.so</span> exists on your machine, even if this is a symbolic link). Then use the <span style="font-style: italic;">--enable-nfsidmap </span>as
a ./configure option. Once compiled, NFS-GANESHA will use libnfsidmap
for every required resolution. Remember that NFS-GANESHA has an
internal hash table to keep memory of this mapping and avoiding making
constant requests to this resolution service, so the resolution will
only be made once, then the result will be kept for later uses. The
libnfsidmap requires a configuration file, the default will be <span style="font-style: italic;">/etc/idmapd.conf</span> but you can set a different path by using the key <span style="font-weight: bold;">IdmapConf </span>under tag <span style="font-weight: bold;">NFSv4 </span>:<br><div style="margin-left: 40px;">NFSv4<br>{<br># Set an alternative path for libnfsidmap configuration file<br>IdmapConf = /etc/idmap.ganesha.conf<br>.....<br>}</div><br>You can avoid using libnfsidmap, in this case, use NFSv4::Domainname to set your daemon's domain name.<br><br>For /etc/idmapd.conf syntax refer to nfs-utils manpages<br></body></html>